<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

//Route::get('index', 'index/index');
//Route::get('index_v2', 'index/index_v2');
//Route::get('table_basic', 'index/table_basic');
Route::get('/admin_login', 'Login/login');
Route::get('/login', 'Login/index');
Route::get('/logout', 'Login/logout');

Route::group(function () {
    Route::get('/index', 'Index/index');
    Route::get('/', 'Index/index');
    Route::get('/home', 'Index/home');
    Route::get('/admin', 'Admin/index');
    Route::get('/adminList', 'Admin/adminList');
    Route::get('/editAdmin', 'Admin/editAdmin');
    Route::get('/addAdmin', 'Admin/addAdmin');
    Route::post('/addAdmin', 'Admin/addAdmin');
    Route::get('/editPsw', 'Admin/editPsw');
    Route::post('/editPsw', 'Admin/editPsw');
    Route::post('/addGoods', 'Goods/addGoods');
    Route::get('/goodsList', 'Goods/goodsList');
    Route::post('/editGoods', 'Goods/editGoods');
    Route::get('/specificationsRelationship', 'Goods/specificationsRelationship');
    Route::post('/editSpecificationsRelationship', 'Goods/editSpecificationsRelationship');
    Route::get('/cateRelationship', 'Goods/cateRelationship');
    Route::post('/editCateRelationship', 'Goods/editCateRelationship');
    Route::get('/orderList', 'Order/orderList');
    Route::post('/editOrder', 'Order/editOrder');
    Route::get('/orderGoodsList', 'Order/orderGoodsList');
    Route::get('/categoryList', 'GoodsCategory/categoryList');
    Route::post('/addCategory', 'GoodsCategory/addCategory');
    Route::post('/editCategory', 'GoodsCategory/editCategory');
    Route::get('/categoryTree', 'GoodsCategory/categoryTree');
    Route::get('/specificationsList', 'Specifications/specificationsList');
    Route::post('/addSpecifications', 'Specifications/addSpecifications');
    Route::post('/editSpecifications', 'Specifications/editSpecifications');
    Route::post('/addUser', 'Users/addUser');
    Route::get('/usersList', 'Users/usersList');
    Route::post('/editUser', 'Users/editUser');
    Route::get('/applyList', 'Users/applyList');
    Route::post('/editApply', 'Users/editApply');
    Route::post('/addNotice', 'Notice/addNotice');
    Route::get('/noticeList', 'Notice/noticeList');
    Route::post('/editNotice', 'Notice/editNotice');

    Route::any('/uploadImg', 'Common/uploadImg');


})->middleware(\app\http\middleware\AdminCheck::class);

